---
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: MIT -->
title: AppBar
description: AppBar API.
---

import CodeSnippetMD from '/src/components/CodeSnippetMD.astro';
import SlintProperty from '/src/components/SlintProperty.astro';

<CodeSnippetMD imagePath="" noScreenShot scale="3" imageWidth="300" imageHeight="200" imageAlt="">
```slint
import { AppBar } from "@material";
export component Example inherits Window {
    width: 400px;
    height: 200px;
    background: transparent;
    AppBar {
        title: "My App";
        width: parent.width;
        height: parent.height;
    }
}
```
</CodeSnippetMD>

An `AppBar` is a top-level navigation component that displays the app title and optional action buttons. It provides a consistent way to present the app's primary navigation and actions.

## Properties

### show-background
<SlintProperty propName="show-background" typeName="bool">
Whether to show show the background color of the app bar or be transparent.
</SlintProperty>

### leading-button
<SlintProperty propName="leading-button" typeName="struct" structName="IconButtonItem">
An icon button item displayed at the start of the app bar, typically used for navigation.
</SlintProperty>

### title
<SlintProperty propName="title" typeName="string">
The title text displayed in the app bar.
</SlintProperty>

### trailing-button
<SlintProperty propName="trailing-button" typeName="struct" structName="IconButtonItem">
An icon button item displayed at the end of the app bar, typically used for actions.
</SlintProperty>

## Callbacks

### leading-button-clicked()
Invoked when the leading icon is clicked.

### trailing-button-clicked()
Invoked when the trailing icon is clicked.